perm filename INTOPS.PAL[HAL,HE]2 blob
sn#157812 filedate 1975-05-07 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 .SBTTL Table of interpreter instructions
C00006 ENDMK
C⊗;
.SBTTL Table of interpreter instructions
;This is parallel to the file INTDEF.SAI[H,RF]
II == 2 ;Start of interpreter jump table (0 is illegal instruction)
;Motion control
MAKEOP XMOVE,MOVE;a ;Prepare, execute move whose traj table is at a.
;Graph node handling
MAKEOP XMVAR,MVAR;l ;Make graph node for given offsets (list arg)
MAKEOP XKVAR,KVAR;l ;Kill graph node at given offsets (list arg)
;Stack operations
MAKEOP XGTVAL,GTVAL;a ;Push value of arg (level-offset pair).
MAKEOP XIGTVAL,IGTVAL;a;Push arg (immediate).
MAKEOP XCHNGE,CHNGE;a ;Pop value into arg (level-offset pair).
MAKEOP XICHNGE,ICHNGE;a;Pop value into arg (immediate).
MAKEOP XPUSH, PUSH ;a ;Push arg directly (as a ptr) onto stack. For cnstnts.
MAKEOP XPOP, POP ;Pop stack.
MAKEOP XCOPY, COPY ;n ;Copy n'th down to top of stack.
MAKEOP XREPLAC,REPLAC;n;Replace n'th down with top (which pop)
MAKEOP XFLUSH,FLUSH ;Flush the entire stack.
;Flow of control
MAKEOP XJUMP, JUMP ;a ;Jump to address
MAKEOP XJUMPZ,JUMPZ;a ;Jump to address only if top zero (which pop)
MAKEOP XTERMINATE,TERMINATE ;Terminate this interpreter
MAKEOP XPROC, PROC;d,al;Call a procedure at d, with arg list al.
MAKEOP XRETURN,RETURN ;Return from procedure
MAKEOP XSPROUT,SPROUT;l;Sprout interpreters at given places, wait (list arg)
MAKEOP XFORCHK,FORCHK;d;Do a FOR-loop check, and fail to location d.
;Arithmetic
MAKEOP XSADD, SADD ;S+S: Add top two elts, pop, pop, push answer
MAKEOP XSSUB, SSUB ;S-S: Sub top two elts, pop, pop, push answer
MAKEOP XSMUL, SMUL ;S*S: Mul top two elts, pop, pop, push answer
MAKEOP XSDIV, SDIV ;S/S: Div top two elts, pop, pop, push answer
MAKEOP XSNEG, SNEG ;-S: Negate top elt, pop, push answer
MAKEOP XVMAG, VMAG ;Scalar ← norm of vector
MAKEOP XSVMUL,SVMUL ;Vector ← scalar * vector
MAKEOP XVDOT, VDOT ;S ← vector dot vector
MAKEOP XPVDOT,PVDOT ;S ← vector dot vector
MAKEOP XVMAKE,VMAKE ;V ← vector(scalar,scalar,scalar)
MAKEOP XVADD, VADD ;V ← vector + vector
;UNITV remove ;Vector ← vector / its norm
;CROSV remove ;Vector ← vector cross vector
MAKEOP XTVMUL,TVMUL ;Vector ← trans * vector
;FTOF
MAKEOP XTMAKE,TMAKE ;Trans ← trans(rot,vector)
MAKEOP XTTMUL,TTMUL ;Trans ← trans * trans
;TINV